﻿using System;
using StackExchange.Redis;

namespace RedDockNet_BackEnd.Service
{
    public interface IRedisService
    {
        /// <summary>
        /// 读取键值
        /// </summary>
        public RedisValue GetKey(string key);
        /// <summary>
        /// 保存键值对
        /// </summary>
        public bool SetKey(string key, string value, TimeSpan? expiry = default);
        /// <summary>
        /// 判断键是否存在
        /// </summary>
        public bool ExistsKey(string key);
        /// <summary>
        /// 删除键
        /// </summary>
        public bool DeleteKey(string key);
    }
}
